#include <iostream>
#include <list>
#include "majestic.h"
using namespace std;
list<Majestic::Object> slatemap;
void Majestic::Slate::addobject(Object &o1)
{
    slatemap.push_back(o1);
}
void Majestic::Slate::removeobject(int objectid)
{
    Object tmp;
    std::list<Object>::iterator iter;
    for (iter = slatemap.begin(); iter != slatemap.end(); iter++)
    {
        tmp = *iter;
        if (tmp.getid()==objectid)
        {
          slatemap.erase(iter);
          break;
        }
  }
}
list<Majestic::Object> &Majestic::Slate::draw()
{
    return slatemap;
}
